<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta content="always" name="referrer">
<meta content="en-US" http-equiv="content-language"/>

{% comment %} 免费域名防火墙设置浏览器icon和title {% endcomment %}

{% unless hide_favicon %}
  {% if template == "module_freedomain_login" or template == "module_login" %}
    <link rel="Shortcut Icon" href="{{ 'freedomain_login_logo.png' | public_asset_abs_url }}">
  {% else %}
  {% if storeConfig.favicon %}
    <link rel="Shortcut Icon" href="{{ storeConfig.favicon }}">
    <link rel="icon" href="{{ storeConfig.favicon }}">
  {% endif %}
  {% endif %}
{% endunless %}




<link rel="alternate" media="only screen and(max-width: 640px)" href="{{ current_domain }}">
<meta property="author" content="{{ current_domain }}"/>
<meta content="CopyRight 2021 {{ current_domain }}, All Rights Reserved" name="copyright"/>
<meta content="on" http-equiv="x-dns-prefetch-control">

{% for item in dns_config %}
  <link rel="dns-prefetch" href='{{ item }}'>
{% endfor %}

{%- capture free_domain -%}
{%- if current_domain == storeInfo.shop_domain -%}
  1  
{%- else -%}
  0
{%- endif -%}
{%- endcapture -%}

{%- capture search_empty -%}
{%- if template == 'search_detail' and search.products.size == 0  and search.keywords -%}
  1  
{%- else -%}
  0
{%- endif -%}
{%- endcapture -%}


{% if free_domain == 1 or search_empty == 1  %}
  <meta content="noindex,nofollow" name="robots">
{% endif %}


{% include header_canonical %}
{% include header_seo %}
{% include header_open_graph %}
{% include header_ld_json %}
{% include header_front_variable %}


{%- if is_theme_edit == 1  -%}
  {% include "analysis_theme" %}
{%- else -%}
  {% comment %} firewall 是否防火墙 不是防火墙加载analysis {% endcomment %}
  {% unless firewall %}
  {% include "analysis" %}
  {% endunless %}
{%- endif -%}


{% include header_style_dynamic %}

{% comment %} 临时域名访问不需要输入密码 {% endcomment %}
<script>

(function () {
  window.addEventListener('DOMContentLoaded', function() {
    let oemsaas_access_passwd = moi.getCookie('oemsaas_access_passwd');
    if(oemsaas_access_passwd === '2' && document.querySelector('#body_domain_prompt') === null) {
      let template = document.createElement('div')
      template.id = 'body_domain_prompt'
      template.style = `background:#000; opacity:0.5;color:#fff;line-height:22px;font-size:16px;color:#eee;text-align:center;padding:7px 0;position:fixed;left:0;bottom:0;width:100%;z-index:9999999;`
      template.innerHTML = `您访问的是临时域名 (${location.host})，此域名方便测试体验软件，请勿用于线上正式网站或者进行推广运营。<br>This Domain (${location.host}) is only for testing and experiencing`;
      document.body.appendChild(template)
    }

    {% comment %} 检查链接是否包含错误提示如果存在添加提示 {% endcomment %}
    let url_error_msg = moi.getUrlParam('_error_message');
    if(url_error_msg){
      alert(url_error_msg)
      history.replaceState(null, null, moi.removeParam('_error_message',location.href));
    }
    {%- if is_theme_edit == 1  -%}
    let is_theme_edit = moi.getCookie('is_theme_edit');
    if(is_theme_edit == '1' && !moi.getUrlParam("quick_view")) {
      var msgText = "Currently in Decoration Preview Mode/当前为装修预览模式"
      let template = document.createElement('div')
      template.id = 'body_domain_prompt'
      template.style = `background: #FFEDC9;color:#fff;line-height:22px;font-size:14px;color:#eee;text-align:center;padding:7px 0;position:fixed;left:0;bottom:0;width:100%;z-index:9999999;color: #666666;`
      template.innerHTML = msgText;
      document.body.appendChild(template);
      document.body.style.paddingBottom = '60px'
    }
    {%- endif -%}
  })
  
})()

</script>

{% comment %} 本地cookie优惠券显示 {% endcomment %}
{% include "coupon_record" %}
{% include 'anime' %}
